<!doctype html>
<html lang="zh-CN"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
    <title>薛尧的博客</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="" />

    
    
    
    <link rel="stylesheet" href="../../../css/theme.min.css">

    
    
    
    
    <link rel="stylesheet" href="../../../css/custom.min.css">
    

    
</head>
<body>
        <div id="content" class="mx-auto"><header class="container mt-sm-5 mt-4 mb-4 mt-xs-1">
    <div class="row">
        
        <div class="col-sm-4 col-12 text-sm-right text-center pt-sm-4">
            <a href="../../../" class="text-decoration-none">
                <img id="home-image" class="rounded-circle"
                    
                        src="https://ueyao.github.io/image-hosting/blog/avatar.png"
                    
                />
            </a>
        </div>
        <div class="col-sm-8 col-12 text-sm-left text-center">
        
            <h2 class="m-0 mb-2 mt-4">
                <a href="../../../" class="text-decoration-none">
                    
                        薛尧
                    
                </a>
            </h2>
            <p class="text-muted mb-1">
                
                    Java Developer | Short Video Creator
                
            </p>
            <ul id="nav-links" class="list-inline mb-2">
                
                
                    <li class="list-inline-item">
                        <a class="badge badge-white " href="../../../about/" title="关于">关于</a>
                    </li>
                
                    <li class="list-inline-item">
                        <a class="badge badge-white " href="../../../post/" title="文章">文章</a>
                    </li>
                
                    <li class="list-inline-item">
                        <a class="badge badge-white " href="../../../categories/" title="分类">分类</a>
                    </li>
                
            </ul>
            <ul id="nav-social" class="list-inline">
                
                    <li class="list-inline-item mr-3">
                        <a href="http://github.com/flowstone" target="_blank">
                            <i class="fab fa-github fa-1x text-muted"></i>
                        </a>
                    </li>
                
                    <li class="list-inline-item mr-3">
                        <a href="mailto:xueyao.me#gmail.com" target="_blank">
                            <i class="fas fa-at fa-1x text-muted"></i>
                        </a>
                    </li>
                
            </ul>
        </div>
    </div>
    <hr />
</header>
<div class="container">
    <div class="pl-sm-2">
        <div class="mb-3">
            <h3 class="mb-0">ElasticSearch从入门到放弃(一)-安装&amp;运行</h3>
            
            <small class="text-muted">发布于 2018-10-18</small>
        </div>

        <article>
            <p>这几天看到新闻，说ElasticSearch上市了，真的没有想到这个非常流行的开源项目竟然上市了，这个公司的程序员都走上了财务自由的道路。
以前用过ElasticSearch全文搜索引擎，但是时间长也忘记了差不多了，以前而且还是用的老版本，不知道新版本如何使用，废话不多说了，开始：</p>
<h3 id="本地环境及版本">本地环境及版本</h3>
<ul>
<li>Java1.8</li>
<li>ElasticSearch6.4.2</li>
<li>kibana6.4.2</li>
</ul>
<h3 id="步骤">步骤</h3>
<ol>
<li>
<p>下载ElasticSearch
<img src="https://ueyao.github.io/image-hosting/blog/20191214170137796.png" alt=""></p>
</li>
<li>
<p>选择自己操作系统所对应的版本
<img src="https://ueyao.github.io/image-hosting/blog/20191214170230123.png" alt=""></p>
</li>
<li>
<p>解压后的目录
<img src="https://ueyao.github.io/image-hosting/blog/20191214170312691.png" alt=""></p>
</li>
<li>
<p>进入bin目录下，运行elasticsearch命令
<img src="https://ueyao.github.io/image-hosting/blog/20191214170400358.png" alt=""></p>
</li>
<li>
<p>看到下图，就说明elasticsearch启动成功，如果你的电脑是Linux，会提示不允许使用root运行，请使用elasticsearch用户启动程序
<img src="https://ueyao.github.io/image-hosting/blog/20191214170510673.png" alt=""></p>
</li>
<li>
<p>浏览器查看http://127.0.0.1:9200,出现下图则说明ElasticSearch启动成功
<img src="https://ueyao.github.io/image-hosting/blog/2017/11/2017-11-20_212810.png" alt=""></p>
</li>
<li>
<p>现在ElasticSearch启动好了，再安装一个图形化操作插件Kibana,原本准备安装Sense，结果安装失败，后来知道，6.4.2版本里已经不支持安装Sense，现在Kibana集成了Sense功能，只需要安装Kibana,下载地址如下
<img src="https://ueyao.github.io/image-hosting/blog/20191214170706807.png" alt=""></p>
</li>
<li>
<p>解压Kibana文件到ElasticSearch目录下(个人习惯)
<img src="https://ueyao.github.io/image-hosting/blog/2019121417073882.png" alt=""></p>
</li>
<li>
<p>运行Kibana项目(/bin/kibana)，看到下图，红色警告部分，因为ElasticSearch服务没有启动，所以kibana项目报告，心跳检测有没有ElasticSearch服务
<img src="https://ueyao.github.io/image-hosting/blog/20191214170815994.png" alt=""></p>
</li>
<li>
<p>当启动ElasticSearch服务，kibana程序检测到有活着的elasticSearch服务，立即注册上
<img src="https://ueyao.github.io/image-hosting/blog/20191214170850998.png" alt=""></p>
</li>
<li>
<p>浏览器查看http://127.0.0.1:5601,出现下图则说明Kibana启动成功
<img src="https://ueyao.github.io/image-hosting/blog/20191214171002432.png" alt=""></p>
</li>
</ol>
<h2 id="总结">总结</h2>
<p>ElasticSearch和Kibana安装和运行是非常容易的，但是还有许多细节需要注意，操作系统和ElasticSearch版本都要弄清楚。</p>

        </article>
    </div>

    <div id="disqus_thread"></div>
<script>
    window.disqus_config = function () {
    
    
    
    };
    (function() {
        if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
            document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
            return;
        }
        var d = document, s = d.createElement('script'); s.async = true;
        s.src = '//' + "xie-yao-de-bo-ke" + '.disqus.com/embed.js';
        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

            </div>
        </div><footer class="text-center pb-1">
    <small class="text-muted">
        
        &copy; Copyright 2024
        
        |
        <a href="https://beian.miit.gov.cn/" target="_blank">苏ICP备14012079号</a>
        <br />
        由 <a href="https://gohugo.io/" target="_blank">Hugo</a> 强力驱动
        | 主题 <a href="https://github.com/austingebauer/devise" target="_blank">Devise</a>
        <br />

    </small>
</footer></body>
</html>
